namespace taurus.client {
    /**
     * Event
     */
    export class Event {
        public target: any;
        public name: string;
        public paramMap: any;

        public constructor(name: string, source: any=null) {
            this.target = source;
            this.name = name;
        }

        public getTarget(): any {
            return this.target;
        }

        public getName(): string {
            return this.name;
        }

        public setTarget(target: any) {
            this.target = target;
        }

        public setName(name: string) {
            this.name = name;
        }

        public getParameter(key: string) {
            return this.paramMap[key];
        }

        public setParameter(key: string, value: any) {
            if (this.paramMap == null) {
                this.paramMap = {};
            }
            this.paramMap[key] = value;
        }

        public toString(): string {
            return "Event { Name:" + name + ", Source: " + this.target + ", Params: " + this.paramMap + " }";
        }
    }
}